package com.arpa.wms.service;

import com.arpa.core.web.Result;
import com.arpa.wms.domain.dto.LocationBearTypeDTO;
import com.arpa.wms.domain.entity.LocationBearType;
import com.arpa.wms.domain.vo.LocationBearTypeVO;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 库位承载类型 服务类
 * </p>
 *
 * @author LEO
 * @since 2020-08-03
 */
public interface ILocationBearTypeService extends IService<LocationBearType> {

    /**
     * 保存
     * @param entity
     * @return
     */
    @Override
    boolean save(LocationBearType entity);

    /**
     * 根据code更新实体
     * @param entity
     * @return
     */
    int updateByCode(LocationBearType entity);

    /**
     * 通过code获取信息
     * @param code
     * @return
     */
    LocationBearType getByCode(String code);

    /**
     * 查询列表
     * @param locationBearTypeDTO
     * @return
     */
    List<LocationBearTypeVO> queryList(LocationBearTypeDTO locationBearTypeDTO);

    /**
     * 删除库区承载类型
     * @param code
     */
    Result deleteByCode(List<String> code);

    /**
     * 查询合计,包含总数
     * @param locationBearTypeDTO
     * @return
     */
    LocationBearTypeVO queryListSum(LocationBearTypeDTO locationBearTypeDTO);

    /**
     * 启用
     * @param codes
     * @return
     */
    int activeStatus(List<String> codes);

    /**
     * 停用
     * @param codes
     * @return
     */
    Map<String,Object> unactiveStatus(List<String> codes);

    /**
     * 验证承载类型
     * @param entity
     * @return
     */
    Result validBearType(LocationBearType entity,String operationMethod);

    /**
     * 库位承载类型下拉数据
     * @return
     */
    List<LocationBearTypeVO> findLocationBearType();

    /**
     *  @author: Allen chen
     *  @Date: 2020/10/10 9:14
     *  @Description: 根据code批量查询
     */
    List<LocationBearTypeVO> queryByCodes(List<String> codes);

    Map<String,Object> batchdel(List<String> codes);
}
